package com.ljh.onlinetest.repository;

import com.ljh.onlinetest.domain.ExamPaperQuestionCustomerAnswer;
import com.ljh.onlinetest.domain.other.ExamPaperAnswerUpdate;
import com.ljh.onlinetest.domain.other.KeyValue;
import com.ljh.onlinetest.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author 余一
 * @date 2022/2/22  23:35
 */
@Mapper
public interface ExamPaperQuestionCustomerAnswerMapper extends BaseMapper<ExamPaperQuestionCustomerAnswer> {
    Integer selectAllCount();

    List<KeyValue> selectCountByDate(@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);

    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);

    int insertList(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers);

    List<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM model);
}
